FROM golang:1.18-alpine AS build


# 1. 安装 neovim
RUN pip3 install pynvim \
    yum -y install neovim \
    echo alias vi="nvim" >> $HOME/.bashrc \
    export EDITOR=nvim >> $HOME/.bashrc \
    source $HOME/.bashrc

COPY ./marmotVim.tar.gz  /tmp
COPY ./gotools-for-spacevim.tgz  /tmp

# 安装go工具
RUN cd /tmp \
    tar -xvzf marmotVim.tar.gz \
    cd marmotVim \
    ./marmotVimCtl install \
    cd /tmp \
    mkdir -p $GOPATH/bin \
    tar -xvzf gotools-for-spacevim.tgz -C $GOPATH/bin

# FROM scratch as final
